package com.ssn.observer.school;

public class Student implements Observer {
    private String name;
    private String deptName;
    Student(String name){
        this.name = name;
        this.deptName = "计科";
    }
    @Override
    public void update(Object o) {
        this.deptName = (String)o;
        System.out.println(name + "的系名更改为：" + deptName);
    }
}
